<template>
  <div>
    <button @click="al(1)">1111(enter)</button>
    <button @click="al(2)">2222(enter)</button>
  </div>
</template>

<script>
  import Child from '@/components/Child'

  export default {
    name: "parent",
    methods: {
      // al(id) {
      //   this.$router.push({
      //     name: 'child',
      //     params: {
      //       id: id
      //     }
      //   })
      // }
      al(id) {
        this.$router.push(`/child/${id}`)
      }
    },

  }
</script>

<style scoped>

</style>